import {createStore,applyMiddleware} from "redux";

import rootReducer from '../reducers';
import {composeWithDevTools} from "redux-devtools-extension";

//中间件  装饰器只能修饰类
import {createLogger} from "redux-logger";
//专门处理dispatch的中间件thunk
import thunk from "redux-thunk";

const logger = createLogger();


const store= createStore(rootReducer,composeWithDevTools(applyMiddleware(thunk,logger)));

export default store;